<template>
  <div>
    <ul>
      <li v-for="name in classmates" :key="name">{{ name }}</li>
    </ul>
    <button @click="sendFriends">发送舍友姓名数组</button>
  </div>
</template>

<script>
export default {
  name: "MyChild02.vue",
  data(){
    return{
      classmates: ['侯堪祥', '任乾语', '刘又铭', '刘德利', '陈立明']
    }
  },
  methods:{
    sendFriends(){
      this.$emit('send-friends',this.classmates);
    }
  }
}
</script>